package com.serviceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bean.Classification;
import com.mapper.ClassificationMapper;
import com.service.ClassificationService;

/**
 * @author  author : 张鹏
 * @date createTime：2018年1月10日 下午10:50:54 
 * @Description: 该类的功能描述
 */
@Service
public class ClassificationServiceImpl implements ClassificationService {
	@Resource
	private ClassificationMapper classificationMappser;
	
	
	@Override
	public List<Classification> getAllClassification() {
		return classificationMappser.selectAll();
	}

	@Override
	public int createNewClassification(Classification classification) {
		return classificationMappser.insert(classification);
	}

	@Override
	public int deleteClassification(int classificationId) {
		
		return classificationMappser.deleteByPrimaryKey(classificationId);
	}

	@Override
	public int editClassification(Classification classification) {
		return classificationMappser.updateByPrimaryKey(classification);
	}

}
